/**
 * @file LogEventWrap.cpp
 * @author  haifeng (haifengxiao@icloud.com)
 * @brief
 * @version 0.1
 * @date 2021-07-06
 *
 * @copyright Copyright (c) 2021
 *
 */

#include "LogEventWrap.h"
#include "Logger.h"

namespace Chen {
    namespace Log {

        LogEventWrap::LogEventWrap(LogEvent::ptr event)
            :m_event(event) {

        }

        LogEventWrap::~LogEventWrap() {
            m_event->getLogger()->log(m_event->getLevel(), m_event);
        }

        std::stringstream& LogEventWrap::getSS() {
            return m_event->getSS();
        }

    }//namespace Log
}//namespace Chen